package com.mengxin.secondkill.constants;

import com.google.common.hash.Funnel;
import com.mengxin.secondkill.util.BloomFilter;

/**
 * @author mengxin
 * @date 2020/12/18 15:03
 */
public class BloomFilterConstant {

    public final static int GOODS_SIZE = 200000;

    public final static Double GOODS_FPP = 0.00001;

    public final static BloomFilter<Long> BLOOM_FILTER = new BloomFilter<>((Funnel<Long>) (from, into) -> into.putLong(from)
            , BloomFilterConstant.GOODS_SIZE
            , BloomFilterConstant.GOODS_FPP
    );

}
